import { Vector3 } from 'three';
import { ValueData } from '../base-data';


/**
 * 三维向量类型数据
 */
class Vector3Data extends ValueData<Vector3> {

    protected generate(from: Vector3): Vector3 {
        return new Vector3().copy(from);
    }

    protected equal(a: Vector3, b: Vector3): boolean {
        return a.x === b.x && a.y === b.y && a.z === b.z;
    }

    protected copy(targetContainer: Vector3[], source: Vector3): void {
        targetContainer[0].copy(source);
    }

}


export { Vector3Data };